
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class Main {

    public static void main(String[] args) throws IOException{
        FileInputStream wzh=new FileInputStream("D:\\wzh.txt");
        FileOutputStream ts=new FileOutputStream("D:\\ts\\wzh.txt");
        byte[] by=new byte[18];
        try {
            int len;
            while((len=wzh.read(by))!=-1) {
                System.out.println(new String(by,0,len));
                ts.write(by);
                ts.write("\r\n".getBytes());
            }
        }catch(IOException e) {
            e.printStackTrace();
        }finally {
            wzh.close();
            ts.close();

        }
    }
}